import { connect } from "react-redux";

import Test from "../comprents/test";

import { addFn } from "../redux/action";

function mapStateToProps(state) {
  return {
      msg: state.msg,
      info:state.info,
  };
}
function mapDispatchToProps(dispatch) {
  return {
    add(num) {
      dispatch(addFn(num));
    },
  };
}

const WithTest = connect(mapStateToProps, mapDispatchToProps)(Test);

export default WithTest;
